using System;
using System.Collections.Generic;
using System.Text;

using Crainiate.Data.Persistence;
using Crainiate.Data.Persistence.Providers;
using Crainiate.Data.Persistence.Providers.SqlServer;

namespace Crainiate.Data.Persistence.Testing
{
    [Serializable]
    public class Order: Table
    {
        //Property variables
        private int _Id;
        private decimal _Shipping;
        private decimal _Tax;
        private decimal _ItemTotal;
        private int _Weight;
        private ShippingAddress _ShippingAddress;
        private Address _BillingAddress;

        #region Interface

        public Order()
        {
            
        }

        public Order(Command command): base(command)
        {

        }


        [PrimaryKey]
        public virtual int Id
        {
            get
            {
                return _Id;
            }
            set
            {
                _Id = value;
            }
        }

        [Column]
        public decimal Shipping
        {
            get 
            { 
                return _Shipping;
            }
            set
            { 
                _Shipping = value;
            }
        }

        [Column, Fixed(18,2)]
        public decimal Tax
        {
            get
            { 
                return _Tax; 
            }
            set
            { 
                _Tax = value;
            }
        }

        [Column]
        public decimal ItemTotal
        {
            get
            { 
                return _ItemTotal;
            }
            set
            { 
                _ItemTotal = value;
            }
        }

        [Column]
        public int TotalWeight
        {
            get 
            { 
                return _Weight; 
            }
            set 
            { 
                _Weight = value; 
            }
        }

        [Column]
        public ShippingAddress ShippingAddress
        {
            get
            {
                return _ShippingAddress;
            }
            set
            {
                _ShippingAddress = value;
            }
        }

        [Column]
        public Address BillingAddress
        {
            get
            {
                return _BillingAddress;
            }
            set
            {
                _BillingAddress = value;
            }
        }

        #endregion
    }
}
